import os
from pathlib import Path
from typing import Dict, Any

# 基础配置
BASE_DIR = Path(__file__).resolve().parent.parent

# 端口配置
PORT_CONFIG = {
    "MIN_PORT": 1024,  # 最小可用端口
    "MAX_PORT": 65535,  # 最大可用端口
    "DEFAULT_WS_PORT": 9002,  # 默认WebSocket端口
}

# WebSocket配置
WS_HOST = "0.0.0.0"
WS_PORT = PORT_CONFIG["DEFAULT_WS_PORT"]

# 模拟数据配置
DEFAULT_SYMBOL = "SETHSUSDT"
DEFAULT_INST_TYPE = "SUSDT-FUTURES"
DEFAULT_PRICE = 2000.0
PRICE_FLUCTUATION = 10.0  # 价格波动范围
UPDATE_INTERVAL = 1.0  # 数据更新间隔（秒）

# Web界面配置
STATIC_DIR = os.path.join(BASE_DIR, "static")
TEMPLATE_DIR = os.path.join(BASE_DIR, "templates")

# 数据库配置
DEFAULT_DB_PATH = r"D:/Work/flutter/ganbg/build/windows/x64/runner/Debug/data/db/strategy_orders.db" 